home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
owlspl2.zip
/
SPLMAIN.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-20
|
1KB
|
80 lines
#include "splasher.hpp"
#pragma hdrstop
#include "splmain.hpp"
TSplashWin::TSplashWin( PTWindowsObject AParent, int ResourceId )
: TDialog( AParent, ResourceId )
{
InitControls();
}
void TSplashWin::InitControls()
{
}
void TSplashWin::SetupWindow()
{
TDialog::SetupWindow();
PostMessage( HWindow, WM_COMMAND, CM_DISPLAY_SPLASH, 0L );
}
LPSTR TSplashWin::GetClassName()
{
return "bordlg_01";
}
void TSplashWin::GetWindowClass( WNDCLASS& WndClass )
{
TDialog::GetWindowClass( WndClass );
WndClass.lpfnWndProc = BWCCDefDlgProc;
WndClass.hIcon = LoadIcon( GetApplication()->hInstance,
MAKEINTRESOURCE( Splash ) );
}
void TSplashWin::CMDisplaySplash( void )
{
SplashWin = GetApplication()->MakeWindow( new TDialog( this, ID_ABOUT ) );
DisplaySplash = TRUE;
SetTimer( HWindow, ID_SPLASH_TIMER, 3000, NULL );
}
void TSplashWin::WMTimer( RTMessage Msg )
{
if ( DisplaySplash && Msg.WParam == ID_SPLASH_TIMER )
{
DisplaySplash = FALSE;
SplashWin->CloseWindow();
}
}
void TSplashWin::CMMainExit( RTMessage )
{
CloseWindow();
}
BOOL TSplashWin::CanClose()
{
return ( BWCCMessageBox( HWindow, "End program now?",
"Please verify", MB_YESNO ) == IDYES );
}
void TSplashWin::CMExit( RTMessage )
{
CloseWindow();
}
void TSplashWin::CMHelpAbout( RTMessage )
{
GetApplication()->ExecDialog( new TDialog( this, ID_ABOUT ) );
}